package com.spring.zhz.anno;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Data
@Component// 等价于 <bean id="user" class="nuc.ss.pojo.User"/>
public class AnnoUser {
    @Value("anno-张zhz")
    private String name;

    @Override
    public String toString() {
        return "AnnoUser{" +
                "name='" + name + '\'' +
                '}';
    }
}
